 const db = require('mssql');
 const pool = require('./mssqlpool.js').pool;

 async function queryMembers() {
     let request = new db.Request(pool);
     let members = await request.query('select top 10 * from MM_Member');
     console.log(pool.id);
     return members.recordset;
 }

 exports.getMembers = async function(req, res) {
     try {
         let members = await queryMembers();
         res.json(members);
     } catch (err) {
         console.log(err);
     }
 }